The Extension Optimization ('eopt') Resource
The extension optimization resource, of typegxExtensionOptimizationType
, provides QuickDraw GX with additional information about the activities of an extension. The information in this resource allows QuickDraw GX to optimize its use. You must include an extension optimization resource in each printing extension. Figure 6-8 shows the structure of an extension optimization resource.Figure 6-8 The extension optimization resource
- Optimization flag. The flags that define when your extension needs to be loaded into memory. Each extension optimization resource contains one or more optimization flags. The constants for these flags are shown in Table 6-11. The flags actually come in pairs: one that specifies that an extension needs to be activated during a certain phase of printing, and a complementary one that specifies that the extension does not need to be active during that phase. QuickDraw GX defines each flag as a Boolean value.
The extension optimization resource ID needs to be the constant
- IMPORTANT
- You need to be careful about setting these flags appropriately. Unnecessarily setting these flags can cause performance degradation during printing to certain devices.
![]()
gxExtensionOptimizationID
. Listing 6-7 shows an example of an extension optimization resource. You can also find an example of an extension optimization resource definition in Listing 2-23 on page 2-37 in the chapter "Printing Extensions."Listing 6-7 An example of an extension optimization resource
resource gxExtensionOptimizationType (gxExtensionOptimizationID, sysHeap, purgeable) { gxDontExecuteDuringImaging, gxDontNeedDeviceStatus, gxChangePageAtGXDespoolPage, gxDontChangePageAtGXImagePage, gxDontChangePageAtGXRenderPage, gxNotServerPresenceRequired, gxClientPresenceRequired };This example specifies that the extension does not have to be available during the imaging phase of printing, does not need to perform two-way communications, and
only changes the page during the despooling process of the imaging phase of printing. This extension does not need to be present on the server, but must be present on the client machine.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help